package com.ftg.learn.psi.service.impl;

import com.ftg.learn.psi.entity.Item;
import com.ftg.learn.psi.mapper.ItemMapper;
import com.ftg.learn.psi.service.IItemService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 商品表 服务实现类
 * </p>
 *
 * @author guoBingTong
 * @since 2022-05-18
 */
@Service
public class ItemServiceImpl extends ServiceImpl<ItemMapper, Item> implements IItemService {

    @Autowired
    ItemMapper itemMapper;


    /**
     * 根据商品条码实现商品的查询
     * @param code
     * @return
     */
    @Override
    public List<Map<String, Object>> findOneItemByCode(String code) {
        return itemMapper.findOneItemByCode(code);
    }
}
